﻿CREATE TABLE [dbo].[Lookups] (
    [Title]         NVARCHAR (100) NOT NULL,
    [Color]         NVARCHAR (100) NULL,
    [LookupTypeID]  INT            NOT NULL,
    [LookupID]      INT            IDENTITY (1, 1) NOT NULL,
    [Discriminator] NVARCHAR (100) DEFAULT ('HazardType') NULL,
    CONSTRAINT [PK_Lookups] PRIMARY KEY CLUSTERED ([LookupID] ASC),
    CONSTRAINT [FK_LookupTypeLookUp] FOREIGN KEY ([LookupTypeID]) REFERENCES [dbo].[LookupTypes] ([LookupTypeID])
);


GO
CREATE NONCLUSTERED INDEX [IX_FK_LookupTypeLookUp]
    ON [dbo].[Lookups]([LookupTypeID] ASC);

